1. Field of the Invention
The present invention relates to a depth measurement apparatus and, more particularly, to a depth measuring function used in a digital still camera and a digital video.
2. Description of the Related Art
In an auto focus (AF) use of a digital still camera or a digital video camera, there is known a method of acquiring parallax images having a parallax and performing stereo depth measurement. Optical images (hereinafter respectively referred to as “A image” and “B image” and collectively referred to as “AB images”) generated by light beams passed through different pupil regions are acquired. An image shift amount (also referred to as parallax), which is a relative positional shift amount of the A image and the B image, is calculated to perform depth measurement.
When the depth measurement is performed, if a target object is an object simultaneously including a distant place and a near place, a correspondence between the image shift amount and perspective is unclear. Therefore, an accurate depth measurement calculation cannot be performed. Concerning an object having a periodical pattern, a plurality of solutions of the image shift amount are obtained. Therefore, an accurate depth measurement calculation cannot be performed.
For these objects that a depth measurement apparatus cannot successfully deal with, Japanese Patent Application Laid-Open No. 2011-007867 adopts a step of determining whether a pattern is a perspective pattern according to pattern matching of an object image and discloses a method of changing, according to a pattern of an object, a pixel region where a depth measurement calculation is performed. Japanese Patent Application Laid-Open No. 2008-304808 discloses a method of setting three or more pupil regions with respect to a periodical pattern to reduce a detection angle and calculating a depth using an image shift amount combined in a later stage.
Japanese Patent Application Laid-Open No. 2011-007867 discloses a method of dividing a pixel region of a sensor for acquiring parallax images into a plurality of blocks and changing setting to calculate respective defocus amounts of conflict objects. However, a specific determination method for setting of the sensor pixel region is not disclosed. There remains possibility that a defocus amount of a perspective pattern cannot be separated even after the setting change. For improvement of accuracy, repeated setting change is necessary. It is difficult to perform quick and highly-accurate depth measurement.
Japanese Patent Application Laid-Open No. 2008-304808 discloses a method of dividing a pupil region into three or more regions and setting the regions and calculating an image shift amount of the regions to exclude false focusing due to a periodical pattern. However, a specific determination method for a division setting value for the pupil region is not disclosed. There remains possibility that the false focusing due to the periodical pattern cannot be excluded. For improvement of accuracy, repeated change of the division setting value is necessary. It is difficult to perform quick and highly-accurate depth measurement.